Skip to content

Conversation

@numew
Copy link
Collaborator

@numew numew commented Jan 8, 2026

Ticket

#5226

Description

  • Modification du fonctionnement du champs de recherche libre pour le rendre plus restrictif sur les cas spécifique (recherche par référence exace ou code postal exact)
  • Modification de fixture et ajout d'un test

Pré-requis

make load-fixtures

Tests

  • Rechercher la valeur [email protected] et voir qu'un résultat est retourné.
  • Recherche une référence exact et voir que c'est le seul résultat retourné.
  • Recherche via un code postal et voir que les résultat concerne bien uniquement ce code postal.

@numew numew marked this pull request as draft January 12, 2026 09:59
} elseif (preg_match('/^'.InjonctionBailleurService::REFERENCE_PREFIX.'[0-9]{4,}$/', mb_strtoupper(mb_trim($filters['searchterms'])))) {
$qb->andWhere('s.referenceInjonction = :searchterms');
$qb->setParameter('searchterms', str_replace(InjonctionBailleurService::REFERENCE_PREFIX, '', mb_strtoupper(mb_trim($filters['searchterms']))));
} elseif ('INJ-XXXX' === mb_strtoupper($filters['searchterms'])) { // top secret
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elseif (InjonctionBailleurService::REFERENCE_PREFIX.'XXXX' === mb_strtoupper($filters['searchterms']))

je valide le commentaire :D

@numew numew marked this pull request as ready for review January 14, 2026 09:00
@sonarqubecloud
Copy link

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test et relecture OK

@hmeneuvrier hmeneuvrier merged commit 30cd0f4 into develop Jan 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants